//
//  ZYSelectViewController.m
//  MerChant_car
//
//  Created by STAR on 2017/11/22.
//  Copyright © 2017年 陈越. All rights reserved.
//

#import "ZYSelectViewController.h"
#import "ZYSelectVCModel.h"
#import "ZYSelectTableViewCell.h"

static NSString *identifier = @"ZYSelectTableViewCell";
const CGFloat rowHeight = 60.f;
@interface ZYSelectViewController ()<UITableViewDelegate,UITableViewDataSource>
@property (weak, nonatomic) IBOutlet UITableView *tableView;

@end

@implementation ZYSelectViewController
- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
        _cModel = [[ZYSelectVCModel alloc]init];
        self.modalPresentationStyle = UIModalPresentationCustom;
        self.transitioningDelegate = (id)_cModel;
    }
    return self;
}
- (void)viewDidLoad {
    [super viewDidLoad];
    _tableView.rowHeight = 60;
    _tableView.delegate = self;
    _tableView.dataSource = self;
    [_tableView registerNib:[UINib nibWithNibName:identifier bundle:nil] forCellReuseIdentifier:identifier];
    [_tableView reloadData];
    
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return self.dataSoucreArray.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    ZYSelectTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier forIndexPath:indexPath];
    cell.ibTitleLabel.text = self.dataSoucreArray[indexPath.row];
    return cell;
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}

@end
